package com.itheima.system.client;

import com.itheima.common.entity.Result;
import com.itheima.system.pojo.client.Department;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author qiankaofei
 * @version 1.0
 * @date 2020/11/18 13:07
 */

@FeignClient("ihrm-company")
public interface DepartmentFeignClient {

    @GetMapping("/company/department/{id}")
    public Result findDepartmentById(@PathVariable("id") String id);

    @RequestMapping(value="/company/department/search",method = RequestMethod.POST)
    public Department findByCode(@RequestParam(value="code") String code, @RequestParam(value="companyId") String companyId);


}
